package com.org.service.impl;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author Rainy-Heights
 * @version 1.0
 * @Date 2023/3/5 14:00
 */
@Service
public class JucServiceTest {
    //注意返回值类型必须是void
    @Async
    public void yibuChart(){
        //测试异步线程任务，休眠3s然后答应
        try {
            Thread.sleep(3000);
            System.out.println("我是异步任务！");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
